<template>
	<view>
		<cu-custom bgColor="bg-white" :isBack="true">
			<block slot="backText"></block>
			<block slot="content">奖品中心</block>
		</cu-custom>
		<view class="qui-cells solid-top">
			<view class="qui-cell">
				<view class="cell-bd">
					<view class="tc mt10">
						<text class="fs66 ff">+{{pageSour.ResultValue}}</text>
						<text class="fs26">元</text>
					</view>
					<view class="fs26 text-muted tc mb30" style="margin-top: -10rpx;" v-text="`${(pageSour.StatusName||'')}至个人钱包`"></view>
				</view>
			</view>
		</view>
		<view class="qui-cells mt10">
			<view class="qui-cell">
				<view class="cell-hd">
					<text class="fs26 text-gray">奖项类型</text>
				</view>
				<view class="cell-bd tr">
					<view>
						<image :src="imgurl+'/icon_qb.png'" class="img28 mr5"></image>
						<text class="fs26" v-text="pageSour.PrizeName"></text>
					</view>
				</view>
			</view>
			<view class="qui-cell">
				<view class="cell-hd">
					<text class="fs26 text-gray">发放时间</text>
				</view>
				<view class="cell-bd tr">
					<view class="fs26" v-text="pageSour.GetCreateTime"></view>
				</view>
			</view>
		</view>
		<view class="qui-cells mt10">
			<view class="qui-cell">
				<view class="cell-hd">
					<text class="fs26 text-gray">交易单号</text>
				</view>
				<view class="cell-bd tr">
					<view class="fs26">暂无</view>
				</view>
			</view>
			<view class="qui-cell">
				<view class="cell-hd">
					<text class="fs26 text-gray">来源路径</text>
				</view>
				<view class="cell-bd tr">
					<view class="fs26" v-text="pageSour.ActivityName"></view>
				</view>
			</view>
			<view class="qui-cell">
				<view class="cell-hd">
					<text class="fs26 text-gray">来源路径</text>
				</view>
				<view class="cell-bd tr">
					<view class="fs26">暂无</view>
				</view>
			</view>
		</view>
		<navigator url="/" class="uni-btns text-bold bottom_btn">
			<button class="uni-btn-main radio uni-btn fs30">返回</button>
		</navigator>
	</view>
</template>

<script>
	import tools from 'utils/tools.js';
	import base from 'utils/base.js';
	export default {
		data() {
			return {
				imgurl: this.$imgurl,
				pageSour:{},
				ActivityPrizeTypeId:tools.getQueryVariable("ActivityPrizeTypeId"),
			}
		},
		mounted() {
			this.lodingInitPage();
		},
		methods: {
			//主界面数据展示、列表切换条件 1红包 2积分 3实物
			lodingInitPage() {
				uni.showLoading({
					title: '加载中',
					mask: true
				});

				var _this = this;
				//获取用户信息
				let globalData = getApp().globalData;
				let userInfo = globalData.UserInfo;
				var requstData = {
					"UserId": userInfo.UserID,
					"ActivityPrizeType": tools.getQueryVariable("ActivityPrizeTypeId") || 0,
					"Id":tools.getQueryVariable("Id") || 0,
					"ActivityId":tools.getQueryVariable("ActivityId") || 0,
					"PageIndex": 0,
					"PageSize": 100
				}

				let params = {
					hideLoading: true,
					type: 'POST',
					url: '/Activity/GetActivityPrizeHistoryListByUserId',
					data: requstData,
					sCallback: function(response) {
						uni.hideLoading();
						if (response.Success) {
							var thisSour = response.Data;
							if ((thisSour || null) == null) return false;

							_this.pageSour = thisSour[0];

						} else {
							uni.showToast({
								icon: 'none',
								title: response.Msg
							});
						}
					}
				};
				base.ActivityRequest(params);
			},
		},

	}
</script>

<style lang="scss">
	.fs66 {
		font-size: 66rpx;
	}

	.img28 {
		width: 28rpx;
		height: 28rpx;
		position: relative;
		top: 5rpx;
	}
</style>
